﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using DotNumerics.LinearAlgebra;
using NPlot;

namespace waterCutCalc
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            double[,] _a = new double[2, 2] { { 1, 1 }, { 1, -1 } };
            Matrix a = new Matrix(_a);
            double [,] _b = new double[2,1]{{5},{1}};
            Matrix b = new Matrix(_b);

            Matrix c = (a.Transpose() * a).Inverse() * a.Transpose() * b;

            //textBox1.Text = c.MatrixToString();
            
            
            //plotSurface2D1.Add(
            int [] x = {1,2,3,4,5,6,7,8};
            int [] y = {1,2,3,4,5,6,7,8};
            LinePlot ram = new LinePlot(x, y);
            ram.Color = Color.Green;
            
            plotSurface2D1.Add(ram);
            plotSurface2D1.Refresh();



        }

        private void plotSurface2D1_Click(object sender, EventArgs e)
        {

        }
    }
}
